package com.css.dzj.dzjap.modules.lawenforcesuper.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "DRAW_TASK_RELATION_RECORD", schema = "DZJAP", catalog = "")
public class DrawTaskRelationRecordEntity {
    private String id;
    private String apSuperTaskId;
    private String recordId;
    private Date createTime;
    private String createPerson;
    private String superType;
    private String cqStatus;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "AP_SUPER_TASK_ID")
    public String getApSuperTaskId() {
        return apSuperTaskId;
    }

    public void setApSuperTaskId(String apSuperTaskId) {
        this.apSuperTaskId = apSuperTaskId;
    }

    @Basic
    @Column(name = "RECORD_ID")
    public String getRecordId() {
        return recordId;
    }

    public void setRecordId(String recordId) {
        this.recordId = recordId;
    }

    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Basic
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "CREATE_PERSON")
    public String getCreatePerson() {
        return createPerson;
    }

    public void setCreatePerson(String createPerson) {
        this.createPerson = createPerson;
    }

    @Basic
    @Column(name = "SUPER_TYPE")
    public String getSuperType() {
        return superType;
    }

    public void setSuperType(String superType) {
        this.superType = superType;
    }

    @Basic
    @Column(name = "CQ_STATUS")
    public String getCqStatus() {
        return cqStatus;
    }

    public void setCqStatus(String cqStatus) {
        this.cqStatus = cqStatus;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}
        if (o == null || getClass() != o.getClass()) {return false;}
        DrawTaskRelationRecordEntity that = (DrawTaskRelationRecordEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(apSuperTaskId, that.apSuperTaskId) &&
                Objects.equals(recordId, that.recordId) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(createPerson, that.createPerson) &&
                Objects.equals(superType, that.superType)&&
                Objects.equals(cqStatus, that.cqStatus);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, apSuperTaskId, recordId, createTime, createPerson, superType, cqStatus);
    }
}
